﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YmtAuth.Domain.Model.Safe
{
    public interface ISafeVerifyStrategy
    {
        AuthSafeHandleCode Execute(UserLoginParameter par, UserLoginAuthRepository repo, AuthSafeConfiguration cfg);
        bool IsLastStrategy { get; }
    }

    public abstract class SafeVerifyStrategyBase : ISafeVerifyStrategy
    {
        public abstract AuthSafeHandleCode Execute(UserLoginParameter par, UserLoginAuthRepository repo,
            AuthSafeConfiguration cfg);

        public virtual bool IsLastStrategy {
            get { return false; }
        }

        //
        //TODO 实现通用验证逻辑
        //

        public override string ToString()
        {
            return "SafeVerifyStrategy";
        }
    }
}
